const BaseController = require("./BaseController");

const UserModel = require("../../model/UserModel");


class UserController extends BaseController {

    login() {

        return this.display("login.html");
    }

    async userList(){

        let user = new UserModel();

        try{
            let userList = await user.select();
            return JSON.stringify(userList);//就是把对象转成json格式
    
        }catch(err){
            console.log(err);
        }
        

    }

}
module.exports = UserController;